package com.gxa.modules.app.hospital.navigation.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.gxa.modules.app.hospital.navigation.dto.ParkGuidanceDto;
import com.gxa.modules.app.hospital.navigation.service.AppGuideService;
import com.gxa.modules.model.entity.hospital.Guide;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 医院指南 前端控制器
 * </p>
 *
 * @author yjl
 * @since 2022-11-12 10:51:34
 */
@RestController
@Api(tags = "就诊指南")
@RequestMapping("/app/guide")
public class AppGuideController {
    @Autowired
    private AppGuideService guideService;

    @ApiOperation("查询业务")
    @PostMapping("/queryAll")
    public R queryAll(){
        List<ParkGuidanceDto> guides = this.guideService.queryAll();
        return R.ok(guides);
    }

    @ApiOperation("查询业务详细信息")
    @PostMapping("/queryById/{id}")
    public R queryById(@PathVariable("id") Integer id){
        Guide guide = this.guideService.queryById(id);
        return R.ok(guide);
    }


}
